import cv2 as cv


def main():
    img = cv.imread('../data/test.png', 0)
    rows, cols = img.shape

    center = (cols / 2, rows / 2)
    rotation_matrix = cv.getRotationMatrix2D(center, 67, 1)
    print("旋转矩阵参数:", rotation_matrix)

    rotated_img = cv.warpAffine(img, rotation_matrix, (cols, rows))

    cv.imshow('Original', img)
    cv.imshow('Rotated', rotated_img)
    cv.waitKey(0)
    cv.destroyAllWindows()


if __name__ == "__main__":
    main()
